package com.company;

public  class chouxiang {
    public static void main(String[] args){
        //抽象
        Animal a=new Dog();
        a.eat();
        a.Sleep();
    }
}
abstract class Animal{
       abstract public void eat();
       public void Sleep(){
       System.out.println("睡觉的方法");
       }
    }

 class Dog extends Animal {
    public void eat(){
        System.out.println("吃的方法");
    }
}